package com.tt.mymu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data //自动为实体类生成常用的方法，set,get,构造方法等
@TableName(value = "t_user")
public class User {
    @TableId(type = IdType.AUTO) //设置主键自增
    private int id;
    @TableField("user_name")
    private String userName;
    @TableField("password")
    private String password;
    @TableField("age")
    private int age;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("create_time")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("update_time")
    private Date updateTime;
    @TableField("status")
    private int status;
    @TableField("token")
    private String token;
    @TableField("real_name")
    private String realName;
    @TableField("address")
    private String address;
}
